#include <reg52.h>
#include <stdio.h>
//#include "timer.h"
int bit16 = 65536;
int osc = 11059200;

void init_timer()
{
    TMOD = 0x01; // 16-bit timer
    // 1ms单位计时器
    TH0 = 0xfc;
    TL0 = 0x18;
    TR0 = 1; // start timer
}
void main()
{
    int times = 0;
    init_timer();
    while (1)
    {
        if(TF0 == 1)
        {
            times+=1;
            TF0 = 0;
        }
        if(times % 1000 == 0)
        {
            printf("1s");
        }
    }
}